<!DOCTYPE html>
<!--管理用户界面-->
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>病人标签绑定</title>
    <link rel="stylesheet" href="patientBind.css">
</head>
<body>

<h4>
    欢迎您：<text th:text="${session.doctorVO.name}"></text>&ensp;
    科室：<text th:text="${session.doctorVO.office}"></text>&ensp;
    权限：<text th:text="${session.doctorVO.role}"></text>
</h4>

<div class="select">
    <a href="/listAllPatient">
        <input type="submit" class="button" value="标签绑定">
    </a>
    <a href="/listAllTags">
        <input type="submit" class="button" value="标签管理">
    </a>
</div>
<hr>

<div class="title">
    <h2 style="font-size: xxx-large">病人标签绑定</h2>
</div>
<div class="list">
    <div>
        <h3>病人姓名:</h3>
        <div class="tt">
            <a th:text="${patient.name}"/>
        </div>
    </div>
    <p></p>
    <div>
        <div th:text="${pb_message}" style="color: red"></div>   <!--总信息-->
        <p></p>
        <h3>病人已有标签:</h3>
        <div class="tt">
            <h4>病人基本信息:</h4>
            <div class="ll" th:each="tag:${tagListOfPatient}" >                         <!--遍历-->
                <span th:if="${tag.tag_group}=='3'">
                <a th:text="${tag.tag_name}"></a>
                <a th:href="@{/deleteBindByTagIdAndPatientId(bind_patient_id=${patient.id}, bind_tag_id=${tag.tag_id},
                oid=${session.doctor.oid}, role=${session.doctor.role})}" onClick="return confirm('确定解绑?');">解绑</a>
                <a th:href="@{/getBindPageByTagIdAndPatientId(bind_patient_id=${patient.id}, bind_tag_id=${tag.tag_id},
                oid=${session.doctor.oid}, role=${session.doctor.role})}">编辑</a>
                </span>
            </div>
            <h4>病人业务属性:</h4>
            <div class="ll" th:each="tag:${tagListOfPatient}" >                         <!--遍历-->
                <span th:if="${tag.tag_group}=='2'">
                <a th:text="${tag.tag_name}"></a>
                <a th:href="@{/deleteBindByTagIdAndPatientId(bind_patient_id=${patient.id}, bind_tag_id=${tag.tag_id},
                oid=${session.doctor.oid}, role=${session.doctor.role})}" onClick="return confirm('确定解绑?');">解绑</a>
                <a th:href="@{/getBindPageByTagIdAndPatientId(bind_patient_id=${patient.id}, bind_tag_id=${tag.tag_id},
                oid=${session.doctor.oid}, role=${session.doctor.role})}">编辑</a>
                </span>
            </div>
            <h4>病人诊疗属性:</h4>
            <div class="ll" th:each="tag:${tagListOfPatient}" >                         <!--遍历-->
                <span th:if="${tag.tag_group}=='1'">
                <a th:text="${tag.tag_name}"></a>
                <a th:href="@{/deleteBindByTagIdAndPatientId(bind_patient_id=${patient.id}, bind_tag_id=${tag.tag_id},
                oid=${session.doctor.oid}, role=${session.doctor.role})}" onClick="return confirm('确定解绑?');">解绑</a>
                <a th:href="@{/getBindPageByTagIdAndPatientId(bind_patient_id=${patient.id}, bind_tag_id=${tag.tag_id},
                oid=${session.doctor.oid}, role=${session.doctor.role})}">编辑</a>
                </span>
            </div>
        </div>
        <p></p>
        <h3>添加标签:</h3>
        <div class="tt">
            <table>
                <tr>
                    <td>
                        <h4>病人基本信息:</h4>
                    </td>
                </tr>
                    <tr>
                        <td>
                            <div class="ll">
                                <a th:each="tag:${tagList}" th:if="${tag.tag_group}=='3'" th:value="${tag.tag_name}" th:text="${tag.tag_name}"
                                   th:href="@{/getBindPage(bind_patient_id=${patient.id}, bind_tag_id=${tag.tag_id},
                                    oid=${session.doctor.oid}, role=${session.doctor.role})}"/>
                            </div>
                        </td>
                    </tr>
                <tr>
                    <td>
                        <h4>病人业务属性:</h4>
                    </td>
                </tr>
                    <tr>
                        <td>
                            <div class="ll">
                                <a th:each="tag:${tagList}" th:if="${tag.tag_group}=='2'" th:value="${tag.tag_name}" th:text="${tag.tag_name}"
                                   th:href="@{/getBindPage(bind_patient_id=${patient.id}, bind_tag_id=${tag.tag_id},
                                    oid=${session.doctor.oid}, role=${session.doctor.role})}"/>
                            </div>
                        </td>
                    </tr>
                <tr>
                    <td>
                        <h4>病人诊疗属性:</h4>
                    </td>
                </tr>

                    <tr>
                        <td>
                            <div class="ll">
                                <a th:each="tag:${tagList}" th:if="${tag.tag_group}=='1'" th:value="${tag.tag_name}" th:text="${tag.tag_name}"
                                   th:href="@{/getBindPage(bind_patient_id=${patient.id}, bind_tag_id=${tag.tag_id},
                                    oid=${session.doctor.oid}, role=${session.doctor.role})}"/>
                            </div>
                        </td>
                    </tr>
            </table>
        </div>
    </div>
</div>

<script language="javascript" type="text/javascript"></script>
</body>
</html>
